import { uniRequset } from '@/utils/request'
import type { ResponeseType } from '@/types/ResponseTtpe'
import type { memberObjType } from '@/types/member'
export const getCodeAPI = (telephone: string) => {
  return uniRequset({
    url: '/user/send_sms/',
    method: 'POST',
    data: {
      telephone,
    },
  })
}

export const loginRegisterCodeApi = (telephone: string, code: string) => {
  return uniRequset<memberObjType>({
    url: '/user/code_login_register/',
    method: 'POST',
    data: {
      telephone,
      code,
    },
  })
}
